package com.zbkj.dal.entity.order;

import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.time.LocalDateTime;

/**
 * 订单地址表
 */
@Data
@TableName("eb_order_address")
public class OrderAddress {

    private int id;

    private String orderNo;

    /**
     * 地址类型 1寄方地址 2收方地址
     */
    private int addressType;

    /**
     * 子业务类型 RENT_CREATE:承享创建 RENT_RETURN:承享归还
     */
    private String businessType;

    /**
     * 地址 ID
     */
    private Integer linkAddressId;
    private Integer provinceCode;
    private String provinceName;
    private Integer cityCode;
    private String cityName;
    private Integer regionCode;
    private String regionName;
    private Integer townCode;
    private String townName;
    private String address;
    private String contactName;
    private String contactPhone;
    private LocalDateTime createTime;
    private LocalDateTime updateTime;

    public String buildAddressDetail() {
        return provinceName + cityName + regionName + address;
    }
}
